package Demo;

import java.io.FileOutputStream;
import java.nio.charset.StandardCharsets;

public class HelloWorld {
    public static void main(String[] args) {
        try (FileOutputStream fos = new FileOutputStream("fos.txt")) {
            String str = "Hello World";
            fos.write(str.getBytes(StandardCharsets.UTF_8));
            System.out.println("written over");
            System.out.println("分支上修改操作");
            System.out.println("分支上又修改了内容");
            System.out.println("分支上又又修改了内容");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
